﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO.Ports;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ZK.HardWareBLL;

namespace ZK.YHP_TransManage.Test
{
    public partial class 领军红绿灯测试 : Form
    {

        TrafficLightBLL trafficLightQ;
        Socket client;
        public 领军红绿灯测试()
        {
            InitializeComponent();

            var ports = SerialPort.GetPortNames();
        }
        //red
        private void button1_Click(object sender, EventArgs e)
        {
            trafficLightQ.RedLight();
            Common.ShowBlackBox.WriteLine("1 red light success");
        }

        //green
        private void button2_Click(object sender, EventArgs e)
        {
            trafficLightQ.GreenLight();
            Common.ShowBlackBox.WriteLine("1 green light success");

        }
        //set
       
        //init
        private void button4_Click(object sender, EventArgs e)
        {
            Models.TerminalM terminalM = new Models.TerminalM();
            terminalM.ip = textBoxIp.Text;
            terminalM.port = Convert.ToInt32(textBoxPort.Text);
            trafficLightQ = new TrafficLightBLL(terminalM);
            Common.ShowBlackBox.WriteLine("1 init is success");

        }


    }
}
